package io.gitee.yxsnake.framework.web.config;

import io.gitee.yxsnake.framework.web.handler.GlobalExceptionHandler;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author snake
 * @description 通用配置
 * @since 2024/11/2 22:15
 */
@AutoConfiguration
public class ResourcesConfig implements WebMvcConfigurer {

    /**
     * 全局异常处理器
     */
    @Bean
    public GlobalExceptionHandler globalExceptionHandler() {
        return new GlobalExceptionHandler();
    }
}

